#include<iostream>
#include<cstring>
using namespace std;
using ll = long long;
const int N = 2e5 + 9;
ll prefix[N], a[N];

int main()
{
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	int t; cin >> t;
	while (t--)
	{
		memset(prefix, 0, sizeof prefix);
		int n, q; cin >> n >> q;
		for (int i = 1; i <= n; ++i)
		{
			int x; cin >> x;
			a[i] = x;
			prefix[i] = prefix[i - 1] + a[i];
		}

		for (int i = 1; i <= q; ++i)
		{
			ll sum = prefix[n];
			int l, r, k; cin >> l >> r >> k;
			sum -= (prefix[r] - prefix[l - 1]);
			sum += (ll)k * (ll)(r - l + 1);

			if (sum % 2 == 0)cout << "NO\n";
			else cout << "YES\n";
		}
	}

	return 0;
}